package com.dao;
import com.entity.AsAccountDetail;
import org.apache.ibatis.annotations.Param;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Date;
import java.util.Map;

public interface AsAccountDetailDao
{
    //向表中添加一条记录
    public Integer addOneDetail( AsAccountDetail detail );

    //查询表 获取分页
    public ArrayList<AsAccountDetail> getAccountDetailOfPage(
            @Param( "userId" ) Integer userId ,
            @Param ( "index" ) Integer index ,
            @Param( "quantity" ) Integer quantity ,
            @Param( "start" )Date start ,
            @Param( "end" )Date end ,
            @Param( "detailType" ) Integer detailType );

    //查询指定用户的交易量
    public Integer getAccountDetailCountOfPage(
            @Param( "userId" ) Integer userId ,
            @Param( "start" )Date start ,
            @Param( "end" )Date end ,
            @Param( "detailType" ) Integer detailType);

    //查询指定用户存在的所有交易类型
    public ArrayList<Map<String,Object>> getDetailTypeByUserId( Integer userId );

    //查询指定条件的代理商的流水 分页
    public ArrayList<Map<String,Object>> getAgentBalancePage(
            @Param( "start" ) Date start ,
            @Param( "end" )Date end ,
            @Param ( "index" ) Integer index ,
            @Param( "quantity" ) Integer quantity );

    //查询指定条件的所有代理商的流水数量
    public Integer getAgentBalanceCount(
            @Param( "start" ) Date start ,
            @Param( "end" ) Date end );
}
